<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<%@ include file="/commons/kindeditor.jsp" %>
<script type="text/javascript">
    $(function() {
    	//初始化类目选择和图片上传器
		TAOTAO.init({fun:function(node){}});
        $('#busDictAddForm').form({
            url : '${path}/admin/busDict/add',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    //之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });
    });
</script>
<style>

</style>
<div style="padding:10px 10px 10px 10px">
        <form id="busDictAddForm" method="post" enctype="multipart/form-data">
            <table class="grid">
				<tr>
                    <td>文字描述:</td>
					<td>
						<input id="description" name="description" type="text" placeholder="请输入文字描述" class="easyui-textbox"  data-options="required:true,width:180" />
					</td>
				</tr>
				<tr>
                    <td>后台标识:</td>
					<td>
						<input id="type" name="type" type="text" placeholder="请输入后台标识" class="easyui-textbox"  data-options="width:180" />
					</td>
				</tr>
				<tr>
					<td>值:</td>
					<td>
						<input id="value" name="value" type="text" placeholder="请输入值" class="easyui-textbox"  data-options="required:true,width:180" />
					</td>
				</tr>
				<tr>
                    <td>显示标签:</td>
					<td>
						<input id="label" name="label" type="text" placeholder="请输入显示标签" class="easyui-textbox"  data-options="required:true,width:180" />
					</td>
				</tr>
				<tr>
                    <td>排序:</td>
					<td>
						<input id="hsort" name="hsort" type="text" placeholder="请输入排序" class="easyui-textbox"  data-options="required:true" />
					</td>
				</tr>
            </table>
        </form>
    </div>